package model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the rorder database table.
 * 
 */
@Embeddable
public class RorderPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="r_name")
	private String rName;

	@Column(name="t_email")
	private String tEmail;

	public RorderPK() {
	}
	public String getRName() {
		return this.rName;
	}
	public void setRName(String rName) {
		this.rName = rName;
	}
	public String getTEmail() {
		return this.tEmail;
	}
	public void setTEmail(String tEmail) {
		this.tEmail = tEmail;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RorderPK)) {
			return false;
		}
		RorderPK castOther = (RorderPK)other;
		return 
			this.rName.equals(castOther.rName)
			&& this.tEmail.equals(castOther.tEmail);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.rName.hashCode();
		hash = hash * prime + this.tEmail.hashCode();
		
		return hash;
	}
}